package com.zjmzxfzhl.modules.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zjmzxfzhl.modules.purchase.entity.PurchaseIndent;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Mapper
 *
 * @author 庄金明
 */
public interface PurchaseIndentMapper extends BaseMapper<PurchaseIndent> {
    /**
     * 查询列表
     *
     * @param page
     * @param entity
     * @return
     */
    List<PurchaseIndent> list(IPage<PurchaseIndent> page, @Param("entity") PurchaseIndent entity);

    /**
     * 查询未关联合同的采购订单
     * @return
     */
    List<PurchaseIndent> listValidIndentWithoutContract();

    /**
     * 清除采购订单与合同的关联
     * @param contractId
     */
    void emptyContractId(@Param("contractId") Long contractId);
}
